<?php

if (file_exists(CMF_ROOT . "data/conf/_config.php")) {
    $runtimeConfig = include_once CMF_ROOT . "data/conf/_config.php";
} else {
    $runtimeConfig = [];
}

switch (APP_PREFIX) {
     case 'simpleboot3':
        $runtimeConfig['template']['taglib_build_in'] = 'cmf\lib\taglib\Cmf,cx';
        // 加上项目设置
        $app_configs = [
            'site_name' => 'thinkcmf',
            // 默认注册用户的分组
            'user_role' => '4',
        ];
         break;
    default:
        $app_configs=[];
        break;
}

$runtimeConfig=array_merge($runtimeConfig,$app_configs);

//对模板进行分层
$configs_theme = [
    // +----------------------------------------------------------------------
    // | CMF 设置
    // +----------------------------------------------------------------------
    'cmf_theme_path' => 'themes/',
    'cmf_default_theme' => APP_PREFIX,
    'cmf_admin_theme_path' => 'themes/',
    'cmf_admin_default_theme' => 'admin_' . APP_PREFIX,
    'cmf_user_theme_path' => 'themes/',
    'cmf_user_default_theme' => 'user_' . APP_PREFIX,
];
$configs_theme=array_merge($runtimeConfig,$configs_theme);


$configs = [
    // +----------------------------------------------------------------------
    // | 应用设置
    // +----------------------------------------------------------------------
    // 应用命名空间
    'app_namespace'           => 'pc',
    // +----------------------------------------------------------------------
    // | 模块设置
    // +----------------------------------------------------------------------
    // 默认模块名
    'default_module'          => 'index',
    // 默认控制器名
    'default_controller'      => 'Index',
    // 默认操作名
    'default_action'          => 'index',
    // +----------------------------------------------------------------------
    // | URL设置
    // +----------------------------------------------------------------------
    // +----------------------------------------------------------------------
    // | 模板设置
    // +----------------------------------------------------------------------
    // +----------------------------------------------------------------------
    // | 异常及错误设置
    // +----------------------------------------------------------------------
    // +----------------------------------------------------------------------
    // | 日志设置
    // +----------------------------------------------------------------------
    // +----------------------------------------------------------------------
    // | Trace设置 开启 app_trace 后 有效
    // +----------------------------------------------------------------------
    // +----------------------------------------------------------------------
    // | 会话设置
    // +----------------------------------------------------------------------
    // +----------------------------------------------------------------------
    // | Cookie设置
    // +----------------------------------------------------------------------
    // +----------------------------------------------------------------------
    // | 数据库设置
    // +----------------------------------------------------------------------
    // +----------------------------------------------------------------------
    // | CMF 设置
    // +----------------------------------------------------------------------
    // +----------------------------------------------------------------------
    // | 自定义 设置
    // +----------------------------------------------------------------------
     'boot_path'          => '/index.php?s=index/index/index',
    // 定义网站前端访问首页
     'www_url'          => '/index.php?s=index/index/index',
    //'agent' => 'Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/56.0.2924.87 Safari/537.36',
     'agent' => 'Mozilla/5.0 (Windows NT 6.1; WOW64; rv:58.0) Gecko/20100101 Firefox/58.0',
    // 队列请求客户端的授权IP
     'job_client'=>['127.0.0.1','192.168.1.19'],
    // 设置产品属性
    'is_sell'=>false,
    // 可以生成预览图片的文件类型
    'thumb_img'=>'jpg,png', 
    'third_sns_type'=>[1=>'wechat'],
    'wechat_snsapi_userinfo'=>['payIndexindex','payIndexindex2','portalIndexindex'],
    //微信相关文件上传存储路径
    'wechat_updata'=> '/upload/wechat/',
    
    
];
return array_merge($configs_theme,$configs);